home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
Folders.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
9KB
|
266 lines
;
; File: Folders.a
;
; Contains: Folder Manager Interfaces.
;
; Version: Technology: Some
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__FOLDERS__') = 'UNDEFINED' THEN
__FOLDERS__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
include 'CodeFragments.a'
ENDIF
IF FOR_SYSTEM8_PREEMPTIVE THEN
IF &TYPE('__FILEMANAGERTYPES__') = 'UNDEFINED' THEN
include 'FileManagerTypes.a'
ENDIF
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE THEN
kOnSystemDisk EQU $8000
kCreateFolder EQU 1
kDontCreateFolder EQU 0
kSystemFolderType EQU 'macs' ; the system folder
kDesktopFolderType EQU 'desk' ; the desktop folder; objects in this folder show on the desk top.
kTrashFolderType EQU 'trsh' ; the trash folder; objects in this folder show up in the trash
kWhereToEmptyTrashFolderType EQU 'empt' ; the "empty trash" folder; Finder starts empty from here down
kPrintMonitorDocsFolderType EQU 'prnt' ; Print Monitor documents
kStartupFolderType EQU 'strt' ; Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here
kShutdownFolderType EQU 'shdf' ; Finder objects (applications, documents, DAs, aliases, to...) to open at shutdown go here
kAppleMenuFolderType EQU 'amnu' ; Finder objects to put into the Apple menu go here
kControlPanelFolderType EQU 'ctrl' ; Control Panels go here (may contain INITs)
kExtensionFolderType EQU 'extn' ; Finder extensions go here
kFontsFolderType EQU 'font' ; Fonts go here
kPreferencesFolderType EQU 'pref' ; preferences for applications go here
kTemporaryFolderType EQU 'temp' ; temporary files go here (deleted periodically, but don't rely on it.)
;
; pascal OSErr FindFolder(short vRefNum, OSType folderType, Boolean createFolder, short *foundVRefNum, long *foundDirID)
;
IF ¨ GENERATINGCFM THEN
Macro
_FindFolder
moveq #0,D0
dc.w $A823
EndM
ELSE
IMPORT_CFM_FUNCTION FindFolder
ENDIF
;
; pascal OSErr ReleaseFolder(short vRefNum, OSType folderType)
;
IF ¨ GENERATINGCFM THEN
Macro
_ReleaseFolder
moveq #11,D0
dc.w $A823
EndM
ELSE
IMPORT_CFM_FUNCTION ReleaseFolder
ENDIF
ENDIF
IF FOR_SYSTEM8_PREEMPTIVE THEN
; ****************************************
; Extensible Folder Manager declarations
; ****************************************
; **************************
; Folder Manager constants
; **************************
; new gestalt constants for gestalt FindFolderAttr (to be moved to Gestalt.h)
gestaltFolderDescSupport EQU 1 ; has FolderDesc calls
; new Folder Manager error codes
badFolderDescErr EQU -4270
duplicateFolderDescErr EQU -4271
noMoreFolderDescErr EQU -4272
invalidFolderTypeErr EQU -4273
duplicateRoutingErr EQU -4274
routingNotFoundErr EQU -4275
badRoutingSizeErr EQU -4276
kExtensionDisabledFolderType EQU 'extD'
kControlPanelDisabledFolderType EQU 'ctrD'
kSystemExtensionDisabledFolderType EQU 'macD'
kApplicationsFolderType EQU 'apps'
kDocumentsFolderType EQU 'docs'
; new constants
kVolumeRootFolderType EQU 'root' ; root folder of a volume
kGlobalPreferencesFolderType EQU 'gprf' ; preferences for all users/workspaces
kChewableItemsFolderType EQU 'flnt' ; items deleted at boot
kApplicationSupportFolderType EQU 'asup' ; third-party items and folders
kSystem7SystemFolderType EQU '[f]blu' ; System 7 system folder
kDebuggerExtensionsFolderType EQU '[f]deb' ; debugger extensions
kDesktopModulesFolderType EQU '[f]dsk' ; desktop animation modules
kEditorsFolderType EQU '[f]edi' ; OpenDoc editors
kExtensionLibrariesFolderType EQU '[f]exl' ; leechlets
kCoopExtensionLibrariesFolderType EQU '[f]cex' ; blue leechlets
kHardwareSupportFolderType EQU '[f]hdw' ; hardware support
kLocalesFolderType EQU '[f]loc' ; locales
kServerLibrariesFolderType EQU '[f]ser' ; servers
kSystemLibrariesFolderType EQU '[f]sys' ; system libraries
kTextEncodingsFolderType EQU '[f]tex' ; encoding tables
kThemesFolderType EQU '[f]thm' ; themes
kStationeryFolderType EQU '[f]stn' ; stationery
; FolderDescFlags values
kPersistentFolderDesc EQU $00000001
kCreateFolderAtBoot EQU $00000002
kFolderCreatedInvisible EQU $00000004
kFolderCreatedNameLocked EQU $00000008
; typedef UInt32 FolderDescFlags
; FolderClass values
kRelativeFolder EQU 'relf'
kSpecialFolder EQU 'spcf'
; typedef OSType FolderClass
doReplace EQU 1
dontReplace EQU 0
; known FolderType values
kBlessedFolder EQU 'blsf'
kCurrentWorkspaceFolder EQU 'cwsf'
kRootFolder EQU 'rotf'
kWorkspacesFolder EQU 'wksf'
; typedef OSType FolderType
; typedef OSType FolderLocation
FolderDesc RECORD 0
descSize ds.l 1 ; offset: $0 (0)
foldType ds.l 1 ; offset: $4 (4)
flags ds.l 1 ; offset: $8 (8)
foldClass ds.l 1 ; offset: $C (12)
foldLocation ds.l 1 ; offset: $10 (16)
badgeSignature ds.l 1 ; offset: $14 (20)
badgeType ds.l 1 ; offset: $18 (24)
reserved ds.l 1 ; offset: $1C (28)
name ds Str63 ; offset: $20 (32)
sizeof EQU * ; size: $60 (96)
ENDR
; typedef UInt32 RoutingFlags
FolderRouting RECORD 0
descSize ds.l 1 ; offset: $0 (0)
fileType ds.l 1 ; offset: $4 (4)
routeFromFolder ds.l 1 ; offset: $8 (8)
routeToFolder ds.l 1 ; offset: $C (12)
flags ds.l 1 ; offset: $10 (16)
sizeof EQU * ; size: $14 (20)
ENDR
; routing constants
kPersistentRouting EQU $00000001
; *************************
; Folder Manager routines
; *************************
; Folder Manager administration routines
;
; pascal OSErr AddFolderDescriptor(FolderType foldType, FolderDescFlags flags, FolderClass foldClass, FolderLocation foldLocation, OSType badgeSignature, OSType badgeType, Str63 name, Boolean replaceFlag)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AddFolderDescriptor
ENDIF
;
; pascal OSErr GetFolderDescriptor(FolderType foldType, Size descSize, FolderDesc *foldDesc)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetFolderDescriptor
ENDIF
;
; pascal OSErr GetFolderTypes(UInt32 requestedTypeCount, UInt32 *totalTypeCount, FolderType *theTypes)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetFolderTypes
ENDIF
;
; pascal OSErr RemoveFolderDescriptor(FolderType foldType)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION RemoveFolderDescriptor
ENDIF
;
; pascal OSErr FindFolderFSObject(FolderType foldType, Boolean createFolder, FSObjectRef *objectRef)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION FindFolderFSObject
ENDIF
;
; pascal OSErr NewFindFolder(short vRefNum, FolderType foldType, Boolean createFolder, short *foundVRefNum, long *foundDirID)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION NewFindFolder
ENDIF
;
; pascal OSErr InvalidateFolderDescriptorCache(short vRefNum, long dirID)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION InvalidateFolderDescriptorCache
ENDIF
; legacy routines
;
; pascal OSErr GetFolderName(short vRefNum, OSType foldType, short *foundVRefNum, StringPtr name)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetFolderName
ENDIF
; routing routines
;
; pascal OSErr AddFolderRouting(OSType fileType, FolderType routeFromFolder, FolderType routeToFolder, RoutingFlags flags, Boolean replaceFlag)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AddFolderRouting
ENDIF
;
; pascal OSErr RemoveFolderRouting(OSType fileType, FolderType routeFromFolder)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION RemoveFolderRouting
ENDIF
;
; pascal OSErr FindFolderRouting(OSType fileType, FolderType routeFromFolder, FolderType *routeToFolder, RoutingFlags *flags)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION FindFolderRouting
ENDIF
;
; pascal OSErr GetFolderRoutings(UInt32 requestedRoutingCount, UInt32 *totalRoutingCount, Size routingSize, FolderRouting *theRoutings)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetFolderRoutings
ENDIF
ENDIF
ENDIF ; __FOLDERS__